#ifndef _INT_HASHMAP_ITERATOR_H_
#define _INT_HASHMAP_ITERATOR_H_
#include "inthashmap.h"

static inline bool operator==(const Int_Hash_Map_Trav& it1, const Int_Hash_Map_Trav& it2) {
    return it1.it == it2.it;
}

static inline bool operator!=(const Int_Hash_Map_Trav& it1, const Int_Hash_Map_Trav& it2) {
    return it1.it != it2.it;
}

// 前置递增运算符重载
static inline Int_Hash_Map_Trav operator++(Int_Hash_Map_Trav& it) {
    it.next(&it);
    return it;
}

// 后置递增运算符重载
static inline Int_Hash_Map_Trav operator++(Int_Hash_Map_Trav& it, int) {
    Int_Hash_Map_Trav re = it;
    it.next(&it);
    return re;
}

// 前置递减运算符重载
static inline Int_Hash_Map_Trav operator--(Int_Hash_Map_Trav& it) {
    it.prev(&it);
    return it;
}

// 后置递减运算符重载
static inline Int_Hash_Map_Trav operator--(Int_Hash_Map_Trav& it, int) {
    Int_Hash_Map_Trav re = it;
    it.prev(&it);
    return re;
}

// 解引用运算符重载
static inline void* operator*(Int_Hash_Map_Trav& it) {
    return it.it->data;
}



#endif